package ca.llsutherland.squash.greeting;

import ca.llsutherland.squash.BaseValidator;
import ca.llsutherland.squash.administrator.AdministratorsValidator;
import ca.llsutherland.squash.domain.Greeting;

public class GreetingsValidator extends BaseValidator{

    public static void validate(Greeting expected, Greeting actual) {
        assertValidDomainObject("News Item should not be null and should have a not null id", actual);
        assertEquals("greeting message should be the same", expected.getMessage(), actual.getMessage());
        assertClock("Created dates should be the same ", expected.getDateCreated(), actual.getDateCreated());
        assertClock("Updated dates should be the same ", expected.getDateUpdated(), actual.getDateUpdated());
        assertClock("Display dates should be the same ", expected.getDisplayDate(), actual.getDisplayDate());
        assertClock("Remove dates should be the same ", expected.getRemoveDate(), actual.getRemoveDate());
        AdministratorsValidator.validate(expected.getCreatedBy(), actual.getCreatedBy());
        assertEquals("is visible should be the same", expected.isVisible(), actual.isVisible());
    }

}
